import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
import RegisterView from '../views/RegisterView.vue'
import UserListView from '../views/UserListView.vue'
import UserProfileView from '../views/UserProfileView.vue'
import NotFound from '../views/NotFound.vue'


const routes = [{
        path: '/myspace/home/',
        name: 'home',
        component: HomeView
    },
    {
        path: '/myspace/userlist/',
        name: 'userlist',
        component: UserListView
    },
    {
        path: '/myspace/userprofile/',
        name: 'userprofile',
        component: UserProfileView
    },
    {
        path: '/myspace/login/',
        name: 'login',
        component:LoginView
    },
    {
        path: '/myspace/register/',
        name: 'register',
        component: RegisterView
    },
    {
        path: '/myspace/404/',
        name: '404',
        component: NotFound
    },

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router